package com.bai.ad.vo;

import com.google.common.base.Strings;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ClassName AdPlanRequest
 *
 * @author Bai
 * @version 1.0
 * @date 2019/2/19 0019 下午 22:33
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdPlanRequest {

    private Long id;

    private Long userid;

    private String planName;

    private String startDate;

    private String endDate;

    public boolean createValidate(){
        return userid != null
                && !Strings.isNullOrEmpty(planName)
                && !Strings.isNullOrEmpty(startDate)
                && !Strings.isNullOrEmpty(endDate);
    }

    public boolean updateValidate(){
        return id != null && userid != null;
    }

    public boolean deleteValidate(){
        return id != null && userid != null;
    }
}
